#!/bin/bash
# By chris1111
# Version "1.0" Geforce Kepler-patcher
# Base on jackluke work
# Credit: KhronoKernel for the binaries

PARENTDIR=$(dirname "$0")
cd "$PARENTDIR"

sudo cp -R ./*.kext /Volumes/Monterey-DISK/System/Volumes/Update/mnt1/System/Library/Extensions
Sleep 1
sudo cp -R ./*.bundle /Volumes/Monterey-DISK/System/Volumes/Update/mnt1/System/Library/Extensions
Sleep 1
echo "Kext Cache repair! Please wait. ."
sudo chown -R root:wheel /System/Volumes/Update/mnt1/System/Library/Extensions
sudo chmod -R 755 /System/Volumes/Update/mnt1/System/Library/Extensions
sudo kmutil install --volume-root /System/Volumes/Update/mnt1/ --update-all
sudo bless --folder /System/Volumes/Update/mnt1/System/Library/CoreServices --bootefi --create-snapshot

echo "Done"


